package com.tl.juc.c1;

public class StateThread {

    public void test1() {
        Thread t1 = new Thread( () -> {
            System.out.println("Thread1---");
        });
        System.out.println(t1.getState());
    }

    public void test2 () throws InterruptedException {
        Thread t1 = new Thread(() -> {
            System.out.println("线程开始执行");
            System.out.println("线程结束执行");
        });
        t1.start();
        Thread.sleep(3000);
        System.out.println(t1.getState());
    }

    public void test3(){
        Thread t1 = new Thread(() -> {

        });
        t1.start();
        System.out.println(t1.getState());
    }
}
